// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** bindOrLife POST /v1/easyapi/server/user/bindOrLife */
export async function bindOrLifeUsingPost(
  body: API.UserOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/user/bindOrLife', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** currentUser POST /v1/easyapi/server/user/currentUser */
export async function currentUserUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseApiCenterUserVo_>('/v1/easyapi/server/user/currentUser', {
    method: 'POST',
    ...(options || {}),
  });
}

/** empowerOrRevoke POST /v1/easyapi/server/user/empowerOrRevoke */
export async function empowerOrRevokeUsingPost(
  body: API.UserOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/user/empowerOrRevoke', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getCode GET /v1/easyapi/server/user/getCode */
export async function getCodeUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseCaptcha_>('/v1/easyapi/server/user/getCode', {
    method: 'GET',
    ...(options || {}),
  });
}

/** listRoleVosByUserId POST /v1/easyapi/server/user/getRolesByUserId */
export async function listRoleVosByUserIdUsingPost(
  body: API.UserOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListRoleVo_>('/v1/easyapi/server/user/getRolesByUserId', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getUserVoById POST /v1/easyapi/server/user/getUserVoById */
export async function getUserVoByIdUsingPost(
  body: API.UserOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseApiCenterUserVo_>('/v1/easyapi/server/user/getUserVoById', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listUserExRoles POST /v1/easyapi/server/user/listRoleVO */
export async function listUserExRolesUsingPost(
  body: API.UserOperationParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListRoleVo_>('/v1/easyapi/server/user/listRoleVO', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** login POST /v1/easyapi/server/user/login */
export async function loginUsingPost(body: API.UserLoginParam, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/user/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** loginOut POST /v1/easyapi/server/user/loginOut */
export async function loginOutUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/user/loginOut', {
    method: 'POST',
    ...(options || {}),
  });
}

/** pageUsers POST /v1/easyapi/server/user/pageUsers */
export async function pageUsersUsingPost(
  body: API.UserPageParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageApiCenterUserVo_>('/v1/easyapi/server/user/pageUsers', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** reGetCode POST /v1/easyapi/server/user/reGetCode */
export async function reGetCodeUsingPost(body: API.Captcha, options?: { [key: string]: any }) {
  return request<API.BaseResponseCaptcha_>('/v1/easyapi/server/user/reGetCode', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** register POST /v1/easyapi/server/user/register */
export async function registerUsingPost(
  body: API.UserRegisterParam,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/v1/easyapi/server/user/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
